﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPages/MasterPage.master" AutoEventWireup="true" CodeBehind="ConsultaCliente.aspx.cs" Inherits="PopPromotoraCallCenter.ConsultaCliente" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadElements" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentElements" runat="server">
    <nav class="titleFilter">
        <ul>
            <li>
                <h1>Pesquisa Cliente</h1>
            </li>
        </ul>
    </nav>
    <div class="formFill">
        <table>
            <tr>
                <th>
                    <label>
                        CPF
                    </label>
                </th>
                <td>
                    <asp:TextBox ID="txtCPF" CssClass="CampoForm" MaxLength="14" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <th>
                    <label>
                        Nome
                    </label>
                </th>
                <td>
                    <asp:TextBox ID="txtNome" CssClass="CampoForm" MaxLength="80" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <th>
                    <label>
                        Campanha
                    </label>
                </th>
                <td>
                    <asp:DropDownList ID="ddlCampanha" CssClass="labelCampo" runat="server" />
                </td>
            </tr>
            <tr>
                <td colspan="2" class="formFillButton">
                    <asp:Button ID="btnPesquisar" CssClass="BotaoForm" runat="server" Text="Pesquisar"
                        OnClick="btnPesquisar_Click" />
                </td>
            </tr>
        </table>
        <asp:GridView ID="gvCliente" runat="server" AutoGenerateColumns="False" CssClass="report"
              GridLines="None" DataKeyNames="idCliente, idCampanha" OnRowCommand="gvCliente_RowCommand" OnRowDataBound="gvCliente_RowDataBound" >
            <Columns>
                <asp:BoundField DataField="nmCliente" HeaderText="Nome" />
                <asp:BoundField DataField="CPF" HeaderText="CPF" />
                <asp:BoundField DataField="NomeCampanha" HeaderText="Campanha" />
                <asp:TemplateField HeaderText="Atender">
                    <ItemStyle HorizontalAlign="Center" />
                    <ItemTemplate>
                        <asp:HiddenField ID="hdAtendente" runat="server" Value='<% # Eval("idAtendente")%>' />
                        <asp:ImageButton ID="btnAtender" CssClass="BotaoForm" CommandArgument='<%# Container.DataItemIndex %>' 
                            CommandName="atender" runat="server" ToolTip="Atender" ImageUrl="~/Styles/Images/atendente.png" />
                        <asp:Label ID="lblBloqueado" Text="Em atendimento" runat="server" Visible="false" />
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
    </div>

</asp:Content>
